const express = require(`express`);
const router = express.Router();

const userCtrl = require("../controller/LBCtrl");

//查询所有标准指标管理信息
router.get("/getstandard", userCtrl.selectUserInfo);

//添加标准指标管理
router.post("/addstandard", userCtrl.standardAdd);

//删除标准指标管理
router.post("/delstandard", userCtrl.standardDel);

//编辑标准指标管理
router.post("/editstandard", userCtrl.standardEdit);

//根据id查询标准指标管理
router.get("/findstandard", userCtrl.standardFind);

//根据名字查询标准指标管理
router.get("/searchstandard", userCtrl.standardSearch);

//查询所有体检机构信息
router.get("/findAllOrganization", userCtrl.organizationAll);

//根据id查询体检机构
router.get("/findByIdOrganization", userCtrl.organizationFindById);

//查询所有体检套餐信息
router.get("/findAllSetmeal", userCtrl.set_mealAll);

router.all("/server", (request, response) => {
  //设置响应头  设置允许跨域
  response.setHeader("Access-Control-Allow-Origin", "*");
  //响应头
  response.setHeader("Access-Control-Allow-Headers", "*");
  //设置响应体
  response.send("HELLO AJAX POST");
});

router.get("/getuser1", userCtrl.selectUserInfo);

module.exports = router;
